package tomasulo.unit;

public class Instr {
	
	public enum OP {
		NOOP, ADDD, SUBD, MULTD, DIVD, LD, ST
	}
	public OP op = OP.NOOP;
	public int op0 = 0;
	public int op1 = 0;
	public int op2 = 0;
	public String instr = null;
	
	public int TIME_WAIT = -1;
	private int timeIssue = TIME_WAIT;
	private int timeComp= TIME_WAIT;
	private int timeWrite = TIME_WAIT;
	
	public Instr(String instr) {
		this.instr = instr;
	}
	
	public void reset() {
		timeIssue = TIME_WAIT;
		timeComp= TIME_WAIT;
		timeWrite = TIME_WAIT;
	}
	
	public void setTimeIssue(int time) {
		this.timeIssue = time;
	}
	public int getTimeIssue() {
		return timeIssue;
	}
	
	public void setTimeComp(int time) {
		this.timeComp = time;
	}
	public int getTimeComp() {
		return timeComp;
	}
	
	public void setTimeWrite(int time) {
		this.timeWrite = time;
	}
	public int getTimeWrite() {
		return timeWrite;
	}
	
}
